package tok

// TokenType represents the type of a token
type TokenType string

const (
	// Special tokens
	ILLEGAL TokenType = "ILLEGAL"
	EOF     TokenType = "EOF"

	// Literals
	STRING TokenType = "STRING" // string literals
	SYMBOL TokenType = "SYMBOL" // identifiers and symbols
	INT    TokenType = "INT"    // integer literals
	REAL   TokenType = "REAL"   // real (floating-point) literals
	BOOLEAN TokenType = "BOOLEAN" // boolean literals

	// Special forms
	DEFINE         TokenType = "DEFINE"
	DISPLAY        TokenType = "DISPLAY"
	BEGIN          TokenType = "BEGIN"
	LAMBDA         TokenType = "LAMBDA"
	SET            TokenType = "SET"
	LET            TokenType = "LET"
	IF             TokenType = "IF"
	COND           TokenType = "COND"
	AND            TokenType = "AND"
	OR             TokenType = "OR"
	NOT            TokenType = "NOT"
	QUOTE          TokenType = "QUOTE"

	// Arithmetic operators
	PLUS           TokenType = "PLUS"     // +
	MINUS          TokenType = "MINUS"    // -
	MULTIPLY       TokenType = "MULTIPLY" // *
	DIVIDE         TokenType = "DIVIDE"   // /

	// Comparison operators
	GREATER        TokenType = "GREATER"         // >
	LESS           TokenType = "LESS"            // <
	EQUAL          TokenType = "EQUAL"           // =
	GREATER_OR_EQUAL TokenType = "GREATER_OR_EQUAL" // >=
	LESS_OR_EQUAL    TokenType = "LESS_OR_EQUAL"    // <=

	// Delimiters
	LPAREN TokenType = "LPAREN" // (
	RPAREN TokenType = "RPAREN" // )
)

// Token represents a lexical token
type Token struct {
	Type    TokenType
	Literal string
	Line    int
	Column  int
}

// NewToken creates a new token
func NewToken(tokenType TokenType, literal string, line, column int) Token {
	return Token{
		Type:    tokenType,
		Literal: literal,
		Line:    line,
		Column:  column,
	}
}